package top.continew.admin.generator.service;

import top.continew.admin.generator.model.entity.TaskTodoUploadDO;
import top.continew.admin.system.model.req.ProcessTodoReq;
import top.continew.starter.data.mp.service.IService;
import top.continew.starter.extension.crud.service.BaseService;
import top.continew.starter.extension.crud.model.resp.PageResp;
import top.continew.admin.generator.model.entity.TaskTodoDO;
import top.continew.admin.generator.model.query.TaskTodoQuery;
import top.continew.admin.generator.model.req.TaskTodoReq;
import top.continew.admin.generator.model.resp.TaskTodoDetailResp;
import top.continew.admin.generator.model.resp.TaskTodoResp;
import java.util.List;
import java.util.Map;

/**
 * 待办事项业务接口
 *
 * @author kellen
 * @since 2025/07/30
 */
public interface TaskTodoService extends BaseService<TaskTodoResp, TaskTodoDetailResp, TaskTodoQuery, TaskTodoReq> , IService<TaskTodoDO> {

    /**
     * 获取用户列表（负责人选择）
     */
    List<Object> getUserList();

    /**
     * 获取待办事项统计
     */
    Map<String, Object> getTaskTodoStats(Long userId);

    /**
     * 获取用户的待办事项列表
     */
    List<TaskTodoResp> getUserTaskTodoList(Long userId, Integer status);

    /**
     * 更新待办事项状态
     */
    void updateTaskStatus(Long id, Integer status, List<TaskTodoReq.AttachmentInfo> attachments);

    /**
     * 分页查询待办事项列表
     */
    PageResp<TaskTodoResp> pageTaskTodo(Integer page, Integer size, String taskContent, Integer taskStatus, Long directorId);

    /**
     * 获取我的待办事项列表
     */
    PageResp<TaskTodoResp> getMyTodoList(Long userId, Integer page, Integer size, List<Integer> status);

    /**
     * 获取待办事项详情
     */
    TaskTodoDetailResp getTodoDetail(Long id);

    /**
     * 处理待办事项
     */
    void processTodo(ProcessTodoReq req);

    /**
     * 处理待办事项（包含样品信息）
     */
    void handleTodoWithSample(top.continew.admin.generator.controller.TaskTodoController.HandleWithSampleReq req);

    /**
     * 导出所有待办事项
     */
    void exportAllTodos(TaskTodoQuery query, jakarta.servlet.http.HttpServletResponse response);
}